<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class login_model extends CI_Model{
    
    private $tableName = 'taikhoancanhan';
    
    function login_model(){
        parent::__construct();
        $this->load->helper('url');
        $this->load->database();
    }
    
    function checkLogin($username, $password){
        
        $query = $this->db->get_where('taikhoancanhan', array('UserName'=> $username,'PassWord'=> $password ));
        $row = $query->row_array();
        if(count($row) > 0){
            return $row;
        }else{
            return false;
        }
        
    }
    
}

?>